/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entity;

import EmployeeServer.Employee;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 *
 * @author HOANG ANH
 */
public class MyEmployee extends EmployeeServer.Employee implements Serializable{

    public String getBirthdayInString() {
        SimpleDateFormat fomater = new SimpleDateFormat("dd MMMM yyyy");
        return fomater.format(super.getBirthday().toGregorianCalendar().getTime());
    }

    public Date getBirthdayInDate() {
        return super.getBirthday().toGregorianCalendar().getTime();
    }

    public String getGender() {
        if (male) {
            return "Male";
        }
        return "Female";
    }

    public MyEmployee(Employee emp) {
        this.birthday = emp.getBirthday();
        this.country = emp.getCountry();
        this.male = emp.isMale();
        this.name = emp.getName();
    }

    public MyEmployee() {
    }

}
